$OpenBSD: patch-src_ruby_supportlib_phusion_passenger_config_nginx_engine_compiler_rb,v 1.1 2016/11/04 22:08:19 jeremy Exp $

Remove hiding of build steps.

--- src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb.orig	Mon Jul 25 19:56:07 2016
+++ src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb	Tue Nov  1 16:37:48 2016
@@ -271,37 +271,17 @@ module PhusionPassenger
 
       def compile_support_libraries
         puts "Compiling support libraries (step 1 of 2)..."
-        progress_bar = ProgressBar.new
         e_working_dir = Shellwords.escape(@working_dir)
         args = "#{@support_libs_string} CACHING=false OUTPUT_DIR=#{e_working_dir}"
-        begin
-          progress_bar.set(0.05)
           Dir.chdir(PhusionPassenger.build_system_dir) do
-            run_rake_task!(args) do |progress, total|
-              progress_bar.set(0.05 + (progress / total.to_f) * 0.95)
-            end
+            run_rake_task!(args)
           end
-          progress_bar.set(1)
-        ensure
-          progress_bar.finish
-        end
       end
 
       def configure_and_compile_nginx
         puts "Compiling Nginx engine (step 2 of 2)..."
-        progress_bar = ProgressBar.new
-        progress_bar.set(0)
-        begin
-          configure_nginx do
-            progress_bar.set(0.25)
-          end
-          compile_nginx do |progress|
-            progress_bar.set(0.25 + progress * 0.75)
-          end
-          progress_bar.set(1)
-        ensure
-          progress_bar.finish
-        end
+        configure_nginx
+        compile_nginx
 
         FileUtils.cp("#{@working_dir}/nginx-#{@nginx_version}/objs/nginx",
           "#{@destdir}/nginx-#{@nginx_version}")
@@ -326,60 +306,12 @@ module PhusionPassenger
         command << "#{shell} ./configure --prefix=/tmp " +
           "#{self.class.configure_script_options} " +
           "--add-module=#{Shellwords.escape PhusionPassenger.nginx_module_source_dir}"
-        run_command_yield_activity(command) do
-          yield
-        end
+        system(command)
       end
 
       def compile_nginx
-        backlog = ""
         e_nginx_source_dir = Shellwords.escape("#{@working_dir}/nginx-#{@nginx_version}")
-
-        # Capture and index the `make --dry-run` output for
-        # progress determination.
-        total_lines = 0
-        dry_run_output = {}
-        `cd #{e_nginx_source_dir} && #{PlatformInfo.gnu_make} --dry-run`.split("\n").each do |line|
-          total_lines += 1
-          dry_run_output[line] = true
-        end
-
-        IO.popen("cd #{e_nginx_source_dir} && #{PlatformInfo.gnu_make} 2>&1", "r") do |io|
-          progress = 1
-          while !io.eof?
-            line = io.readline
-            backlog << line
-            # If the output is part of what we saw when dry-running,
-            # then increase progress bar. Otherwise it could be compiler
-            # warnings or something, so ignore those.
-            if dry_run_output[line.chomp]
-              yield(progress / total_lines.to_f)
-              progress += 1
-            end
-          end
-        end
-        if $?.exitstatus != 0
-          @stderr.puts
-          @stderr.puts "*** ERROR: unable to compile web helper."
-          @stderr.puts backlog
-          exit 1
-        end
-      end
-
-      def run_command_yield_activity(command)
-        backlog = ""
-        IO.popen("#{command} 2>&1", "rb") do |io|
-          while !io.eof?
-            backlog << io.readline
-            yield
-          end
-        end
-        if $?.exitstatus != 0
-          @stderr.puts
-          @stderr.puts backlog
-          @stderr.puts "*** ERROR: command failed: #{command}"
-          exit 1
-        end
+        system "cd #{e_nginx_source_dir} && #{PlatformInfo.gnu_make}"
       end
     end
 
